#ifdef HAS_TEAM_SELECTION

public static byte selectedTeam		= 0;

/** Team selection menu. */
public static IconMenu tsMenu;

public void updateTeamSelection()
{
	if (subState == STATES.INIT)
	{
		tsMenu = new IconMenu(cGame_g, shields, TEXT.TEAMS_NAMES, this, true);
		backgroundColor = 0xffffff;	// TODO: traerlo de lo exportado por DIDI.
		subState = STATES.UPDATE;
	}
	else
	{
		/**
		 * Draws the background of the screen.
		 * */
		cGame_g.setClip(0,0,SCREEN_WIDTH, SCREEN_HEIGHT);
		cGame_g.setColor(backgroundColor);
		cGame_g.fillRect(0,0,SCREEN_WIDTH, SCREEN_HEIGHT);
		
		/**
		* Draws the messages to the user. It will tell the user what to do, step by step.
		* */
		cGame_g.drawString(TEXT.TEAM_SELECTION_MESSAGES[TEXT.TITLE_IDX], SCREEN_WIDTH >> 1, SCREEN_HEIGHT >> 3, DSmallFont.BOTTOM | DSmallFont.HCENTER ); 
		
		tsMenu.update(lastKeyCode);
		
		if (tsMenu.isSelectionDone())
		{
			selectedTeam = tsMenu.getSelectedItem();
			rmsSave(RMS_INFO.TEAM_SELECTED, TEXT.TEAMS_FILES[selectedTeam].getBytes());
			setState(STATES.TEMPLATE_HANDLER);
		}
	}
}

#endif